package cn.s1995.sloth.bizs.oo.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * SyhUserDTO
 *
 * @author Lex
 * @description 三眼狐用户
 * @date 2024/01/12 14:08
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class SyhUserDTO implements Serializable {

    @JsonProperty("_id")
    private Id id;
    @JsonProperty("register_date")
    private Long registerDate;
    @JsonProperty("username")
    private String username;
    @JsonProperty("password")
    private String password;
    @JsonProperty("mobile")
    private String mobile;
    @JsonProperty("mobile_confirmed")
    private Integer mobileConfirmed;
    @JsonProperty("allow_login_background")
    private Boolean allowLoginBackground;
    @JsonProperty("avatar")
    private String avatar;
    @JsonProperty("avatar_file")
    private AvatarFile avatarFile;
    @JsonProperty("bg_image")
    private String bgImage;
    @JsonProperty("brief")
    private String brief;
    @JsonProperty("create_uid")
    private Id createUid;
    @JsonProperty("nickname")
    private String nickname;
    @JsonProperty("status")
    private Integer status;
    @JsonProperty("update_uid")
    private Id updateUid;
    @JsonProperty("user_no")
    private String userNo;
    @JsonProperty("role")
    private List<String> role;

    @JsonIgnoreProperties(ignoreUnknown = true)
    @Data
    public static class Id implements Serializable {
        @JsonProperty("$oid")
        private String oid;
    }

    @JsonIgnoreProperties(ignoreUnknown = true)
    @Data
    public static class AvatarFile implements Serializable {
        @JsonProperty("url")
        private String url;
    }
}
